package com.qiyi.player.wonder.plugins.scenetile.view
{
   import org.puremvc.as3.patterns.mediator.Mediator;
   import com.qiyi.player.wonder.common.sw.ISwitch;
   import com.qiyi.player.wonder.plugins.scenetile.model.SceneTileProxy;
   import com.qiyi.player.wonder.common.sw.SwitchManager;
   import flash.events.MouseEvent;
   import com.iqiyi.components.global.GlobalStage;
   import com.qiyi.player.wonder.plugins.scenetile.SceneTileDef;
   import com.qiyi.player.wonder.body.BodyDef;
   import com.qiyi.player.wonder.plugins.controllbar.ControllBarDef;
   import com.qiyi.player.wonder.plugins.ad.ADDef;
   import com.qiyi.player.wonder.plugins.topbar.TopBarDef;
   import com.qiyi.player.wonder.plugins.continueplay.ContinuePlayDef;
   import com.qiyi.player.wonder.plugins.setting.SettingDef;
   import com.qiyi.player.wonder.plugins.videolink.VideoLinkDef;
   import org.puremvc.as3.interfaces.INotification;
   import com.qiyi.player.wonder.plugins.controllbar.model.ControllBarProxy;
   import com.qiyi.player.wonder.body.model.PlayerProxy;
   import gs.TweenLite;
   import com.qiyi.player.core.model.def.DefinitionEnum;
   import com.qiyi.player.wonder.common.sw.SwitchDef;
   import com.qiyi.player.wonder.plugins.dock.model.DockProxy;
   import com.qiyi.player.wonder.plugins.dock.DockDef;
   import com.qiyi.player.wonder.common.config.FlashVarConfig;
   import flash.events.Event;
   import com.qiyi.player.wonder.body.model.UserProxy;
   import com.qiyi.player.wonder.common.vo.UserInfoVO;
   import com.qiyi.player.wonder.plugins.ad.model.ADProxy;
   import com.qiyi.player.wonder.plugins.continueplay.model.ContinuePlayProxy;
   import com.qiyi.player.wonder.plugins.videolink.model.VideoLinkProxy;
   import flash.ui.Mouse;
   import com.qiyi.player.wonder.common.lso.LSO;
   import com.qiyi.player.wonder.common.pingback.PingBack;
   import com.qiyi.player.wonder.common.pingback.PingBackDef;
   import com.qiyi.player.wonder.plugins.setting.model.SettingProxy;
   
   public class SceneTileToolViewMediator extends Mediator implements ISwitch
   {
      
      public function SceneTileToolViewMediator(param1:SceneTileToolView) {
         super(NAME,param1);
         this._sceneTileView = param1;
      }
      
      public static const NAME:String = "com.qiyi.player.wonder.plugins.scenetile.view.SceneTileToolViewMediator";
      
      private var _sceneTileProxy:SceneTileProxy;
      
      private var _sceneTileView:SceneTileToolView;
      
      private var _fullHDTipShown:Boolean;
      
      override public function onRegister() : void {
         super.onRegister();
         SwitchManager.getInstance().register(this);
         this._sceneTileProxy = facade.retrieveProxy(SceneTileProxy.NAME) as SceneTileProxy;
         this._sceneTileView.addEventListener(SceneTileEvent.Evt_ToolOpen,this.onSceneTileToolViewOpen);
         this._sceneTileView.addEventListener(SceneTileEvent.Evt_ToolClose,this.onSceneTileToolViewClose);
         this._sceneTileView.playBtn.addEventListener(MouseEvent.CLICK,this.onPlayBtnClick);
         this._sceneTileView.addEventListener(SceneTileEvent.Evt_TipCloseBtnClick,this.onTipCloseBtnClick);
         GlobalStage.stage.addEventListener(MouseEvent.MOUSE_MOVE,this.onStageMouseMove);
      }
      
      override public function listNotificationInterests() : Array {
         return [SceneTileDef.NOTIFIC_ADD_STATUS,SceneTileDef.NOTIFIC_REMOVE_STATUS,BodyDef.NOTIFIC_RESIZE,BodyDef.NOTIFIC_CHECK_USER_COMPLETE,BodyDef.NOTIFIC_PLAYER_ADD_STATUS,BodyDef.NOTIFIC_PLAYER_REMOVE_STATUS,BodyDef.NOTIFIC_FULL_SCREEN,BodyDef.NOTIFIC_PLAYER_SWITCH_PRE_ACTOR,BodyDef.NOTIFIC_JS_LIGHT_CHANGED,BodyDef.NOTIFIC_PLAYER_RUNNING,BodyDef.NOTIFIC_PLAYER_REPLAYED,BodyDef.NOTIFIC_COLLECT_STATE_CHANGE,BodyDef.NOTIFIC_VIDEO_REQUEST_IMAGE,BodyDef.NOTIFIC_VIDEO_DESTROY_IMAGE,ControllBarDef.NOTIFIC_ADD_STATUS,ControllBarDef.NOTIFIC_REMOVE_STATUS,ControllBarDef.NOTIFIC_DEF_BTN_POS_CHANGE,ADDef.NOTIFIC_ADD_STATUS,TopBarDef.NOTIFIC_ADD_STATUS,TopBarDef.NOTIFIC_REMOVE_STATUS,ContinuePlayDef.NOTIFIC_ADD_STATUS,ContinuePlayDef.NOTIFIC_REMOVE_STATUS,SettingDef.NOTIFIC_ADD_STATUS,VideoLinkDef.NOTIFIC_REMOVE_STATUS];
      }
      
      override public function handleNotification(param1:INotification) : void {
         super.handleNotification(param1);
         var _loc2_:Object = param1.getBody();
         var _loc3_:String = param1.getName();
         var _loc4_:String = param1.getType();
         var _loc5_:ControllBarProxy = null;
         var _loc6_:PlayerProxy = null;
         switch(_loc3_)
         {
            case SceneTileDef.NOTIFIC_ADD_STATUS:
               if(int(_loc2_) == SceneTileDef.STATUS_FULL_HD_TIP_SHOW)
               {
                  _loc5_ = facade.retrieveProxy(ControllBarProxy.NAME) as ControllBarProxy;
                  this._sceneTileView.fullHDBtnX = _loc5_.collectBtnX;
                  this._sceneTileView.fullHDBtnY = _loc5_.hasStatus(ControllBarDef.STATUS_SHOW)?SceneTileDef.STAGE_GAP_1:SceneTileDef.STAGE_GAP_2;
                  TweenLite.killTweensOf(this.delayedHideFullHDTip);
                  TweenLite.delayedCall(SceneTileDef.FULL_HD_TIP_HIDE_DELAY_TIME / 1000,this.delayedHideFullHDTip);
               }
               if(int(_loc2_) == SceneTileDef.STATUS_FOCUS_OPEN)
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               this._sceneTileView.onAddStatus(int(_loc2_));
               break;
            case SceneTileDef.NOTIFIC_REMOVE_STATUS:
               if(int(_loc2_) == SceneTileDef.STATUS_FOCUS_OPEN && (this.checkPlayBtnShowStatus()))
               {
                  this._sceneTileProxy.addStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               this._sceneTileView.onRemoveStatus(int(_loc2_));
               break;
            case BodyDef.NOTIFIC_RESIZE:
               this._sceneTileView.onResize(_loc2_.w,_loc2_.h);
               this.updateBorderShowState();
               break;
            case BodyDef.NOTIFIC_CHECK_USER_COMPLETE:
               this.onCheckUserComplete();
               break;
            case BodyDef.NOTIFIC_PLAYER_ADD_STATUS:
               this.onPlayerStatusChanged(int(_loc2_),true,_loc4_);
               break;
            case BodyDef.NOTIFIC_PLAYER_REMOVE_STATUS:
               this.onPlayerStatusChanged(int(_loc2_),false,_loc4_);
               break;
            case BodyDef.NOTIFIC_FULL_SCREEN:
               break;
            case BodyDef.NOTIFIC_PLAYER_SWITCH_PRE_ACTOR:
               this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
               TweenLite.killTweensOf(this.delayedHideFullHDTip);
               _loc6_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
               if(_loc6_.curActor.hasStatus(BodyDef.PLAYER_STATUS_ALREADY_READY))
               {
                  this._fullHDTipShown = _loc6_.curActor.movieModel.curDefinitionInfo.type == DefinitionEnum.FULL_HD;
               }
               break;
            case BodyDef.NOTIFIC_JS_LIGHT_CHANGED:
               this.onLightChanged(Boolean(_loc2_));
               break;
            case BodyDef.NOTIFIC_PLAYER_RUNNING:
               this.onPlayerRunning(_loc2_.currentTime,_loc2_.bufferTime,_loc2_.duration,_loc2_.playingDuration);
               break;
            case BodyDef.NOTIFIC_PLAYER_REPLAYED:
               _loc6_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
               if((_loc6_.curActor.movieModel) && _loc6_.curActor.movieModel.curDefinitionInfo.type == DefinitionEnum.FULL_HD)
               {
                  this._fullHDTipShown = true;
               }
               else
               {
                  this._fullHDTipShown = false;
               }
               break;
            case BodyDef.NOTIFIC_COLLECT_STATE_CHANGE:
               _loc6_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
               if(_loc4_ == BodyDef.PLAYER_ACTOR_NOTIFIC_TYPE_CUR && (_loc6_.curActor.collectStateInfo.isCollect))
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
               }
               break;
            case BodyDef.NOTIFIC_VIDEO_REQUEST_IMAGE:
               this._sceneTileView.requestUnAutoPlayImage();
               break;
            case BodyDef.NOTIFIC_VIDEO_DESTROY_IMAGE:
               this._sceneTileView.destroyImageLoader();
               break;
            case ControllBarDef.NOTIFIC_ADD_STATUS:
               this.onControllBarStatusChanged(int(_loc2_),true);
               break;
            case ControllBarDef.NOTIFIC_REMOVE_STATUS:
               this.onControllBarStatusChanged(int(_loc2_),false);
               break;
            case ControllBarDef.NOTIFIC_DEF_BTN_POS_CHANGE:
               _loc5_ = facade.retrieveProxy(ControllBarProxy.NAME) as ControllBarProxy;
               this._sceneTileView.fullHDBtnX = _loc5_.collectBtnX;
               if(_loc5_.hasStatus(ControllBarDef.STATUS_PREVIEW_VIDEO_SHOW))
               {
                  this.checkOverlapPreview(_loc5_.previewX);
               }
               break;
            case ADDef.NOTIFIC_ADD_STATUS:
               this.onADStatusChanged(int(_loc2_),true);
               break;
            case TopBarDef.NOTIFIC_ADD_STATUS:
               this.onTopBarStatusChanged(int(_loc2_),true);
               break;
            case TopBarDef.NOTIFIC_REMOVE_STATUS:
               this.onTopBarStatusChanged(int(_loc2_),false);
               break;
            case ContinuePlayDef.NOTIFIC_ADD_STATUS:
               if(int(_loc2_) == ContinuePlayDef.STATUS_OPEN)
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               break;
            case ContinuePlayDef.NOTIFIC_REMOVE_STATUS:
               if(int(_loc2_) == ContinuePlayDef.STATUS_OPEN && (this.checkPlayBtnShowStatus()))
               {
                  this._sceneTileProxy.addStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               break;
            case VideoLinkDef.NOTIFIC_REMOVE_STATUS:
               if(int(_loc2_) == VideoLinkDef.STATUS_OPEN && (this.checkPlayBtnShowStatus()))
               {
                  this._sceneTileProxy.addStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               break;
            case SettingDef.NOTIFIC_ADD_STATUS:
               if(int(_loc2_) == SettingDef.STATUS_DEFINITION_OPEN)
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
               }
               break;
         }
      }
      
      public function getSwitchID() : Vector.<int> {
         return Vector.<int>([SwitchDef.ID_SHOW_MAX_MIN_BTN,SwitchDef.ID_SHOW_LOGO]);
      }
      
      public function onSwitchStatusChanged(param1:int, param2:Boolean) : void {
         var _loc3_:PlayerProxy = null;
         switch(param1)
         {
            case SwitchDef.ID_SHOW_MAX_MIN_BTN:
               break;
            case SwitchDef.ID_SHOW_LOGO:
               _loc3_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
               if(param2)
               {
                  if(this.checkLogoShowStatus())
                  {
                     _loc3_.curActor.floatLayer.showLogo = true;
                     _loc3_.preActor.floatLayer.showLogo = true;
                  }
               }
               else
               {
                  _loc3_.curActor.floatLayer.showLogo = false;
                  _loc3_.preActor.floatLayer.showLogo = false;
               }
               break;
         }
      }
      
      private function updateBorderShowState() : void {
         var _loc1_:DockProxy = facade.retrieveProxy(DockProxy.NAME) as DockProxy;
         var _loc2_:ControllBarProxy = facade.retrieveProxy(ControllBarProxy.NAME) as ControllBarProxy;
         if(!_loc1_.hasStatus(DockDef.STATUS_LIGHT_ON) && (_loc2_.hasStatus(ControllBarDef.STATUS_SHOW)) && !GlobalStage.isFullScreen())
         {
            this._sceneTileView.drawBorder();
         }
         else
         {
            this._sceneTileView.clearBorder();
         }
      }
      
      private function onSceneTileToolViewOpen(param1:SceneTileEvent) : void {
         if(!this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_TOOL_OPEN))
         {
            this._sceneTileProxy.addStatus(SceneTileDef.STATUS_TOOL_OPEN);
         }
      }
      
      private function onSceneTileToolViewClose(param1:SceneTileEvent) : void {
         if(this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_TOOL_OPEN))
         {
            this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_TOOL_OPEN);
         }
      }
      
      private function onTipCloseBtnClick(param1:SceneTileEvent) : void {
         if(this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW))
         {
            this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
         }
      }
      
      private function onPlayBtnClick(param1:MouseEvent) : void {
         var _loc2_:PlayerProxy = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
         if(!FlashVarConfig.autoPlay && !_loc2_.curActor.hasStatus(BodyDef.PLAYER_STATUS_ALREADY_LOAD_MOVIE))
         {
            sendNotification(BodyDef.NOTIFIC_VIDEO_DESTROY_IMAGE);
            sendNotification(BodyDef.NOTIFIC_INIT_PLAY);
         }
         else
         {
            sendNotification(BodyDef.NOTIFIC_PLAYER_RESUME);
            sendNotification(ADDef.NOTIFIC_RESUME);
            GlobalStage.stage.dispatchEvent(new Event("tmp_dis_resume_to_p2p"));
         }
      }
      
      private function onPlayerStatusChanged(param1:int, param2:Boolean, param3:String) : void {
         var _loc4_:PlayerProxy = null;
         if(param3 != BodyDef.PLAYER_ACTOR_NOTIFIC_TYPE_CUR)
         {
            return;
         }
         switch(param1)
         {
            case BodyDef.PLAYER_STATUS_ALREADY_LOAD_MOVIE:
               if(param2)
               {
                  this._fullHDTipShown = false;
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
               }
               break;
            case BodyDef.PLAYER_STATUS_ALREADY_READY:
               if(param2)
               {
                  _loc4_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
                  this._fullHDTipShown = _loc4_.curActor.movieModel.curDefinitionInfo.type == DefinitionEnum.FULL_HD;
               }
               break;
            case BodyDef.PLAYER_STATUS_PAUSED:
               if(param2)
               {
                  if(this.checkPlayBtnShowStatus())
                  {
                     this._sceneTileProxy.addStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
                  }
               }
               else
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               break;
            case BodyDef.PLAYER_STATUS_PLAYING:
               if(param2)
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
               }
               break;
            case BodyDef.PLAYER_STATUS_FAILED:
            case BodyDef.PLAYER_STATUS_STOPED:
               if(param2)
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
                  TweenLite.killTweensOf(this.delayedHideFullHDTip);
               }
               break;
         }
      }
      
      private function onLightChanged(param1:Boolean) : void {
         this.updateBorderShowState();
      }
      
      private function onControllBarStatusChanged(param1:int, param2:Boolean) : void {
         var _loc3_:ControllBarProxy = null;
         switch(param1)
         {
            case ControllBarDef.STATUS_SHOW:
               this.updateBorderShowState();
               if(param2)
               {
                  this._sceneTileView.setGap(SceneTileDef.STAGE_GAP_1);
               }
               else
               {
                  this._sceneTileView.setGap(SceneTileDef.STAGE_GAP_2);
               }
               break;
            case ControllBarDef.STATUS_PREVIEW_VIDEO_SHOW:
               if(param2)
               {
                  _loc3_ = facade.retrieveProxy(ControllBarProxy.NAME) as ControllBarProxy;
                  this.checkOverlapPreview(_loc3_.previewX);
               }
               break;
         }
      }
      
      private function onADStatusChanged(param1:int, param2:Boolean) : void {
         switch(param1)
         {
            case ADDef.STATUS_PLAYING:
               if(param2)
               {
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_PLAY_BTN_SHOW);
                  TweenLite.killTweensOf(this.delayedHideFullHDTip);
                  this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
               }
               break;
            case ADDef.STATUS_PLAY_END:
               break;
         }
      }
      
      private function onTopBarStatusChanged(param1:int, param2:Boolean) : void {
         var _loc3_:PlayerProxy = null;
         switch(param1)
         {
            case TopBarDef.STATUS_SHOW:
               _loc3_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
               if(param2)
               {
                  if(_loc3_.curActor.floatLayer)
                  {
                     _loc3_.curActor.floatLayer.showLogo = false;
                  }
                  if(_loc3_.preActor.floatLayer)
                  {
                     _loc3_.preActor.floatLayer.showLogo = false;
                  }
               }
               else if(this.checkLogoShowStatus())
               {
                  if(_loc3_.curActor.floatLayer)
                  {
                     _loc3_.curActor.floatLayer.showLogo = true;
                  }
                  if(_loc3_.preActor.floatLayer)
                  {
                     _loc3_.preActor.floatLayer.showLogo = true;
                  }
               }
               
               break;
         }
      }
      
      private function onCheckUserComplete() : void {
         var _loc1_:UserProxy = facade.retrieveProxy(UserProxy.NAME) as UserProxy;
         var _loc2_:UserInfoVO = new UserInfoVO();
         _loc2_.isLogin = _loc1_.isLogin;
         _loc2_.passportID = _loc1_.passportID;
         _loc2_.userID = _loc1_.userID;
         _loc2_.userName = _loc1_.userName;
         _loc2_.userLevel = _loc1_.userLevel;
         _loc2_.userType = _loc1_.userType;
         this._sceneTileView.onUserInfoChanged(_loc2_);
      }
      
      private function checkPlayBtnShowStatus() : Boolean {
         var _loc1_:ADProxy = facade.retrieveProxy(ADProxy.NAME) as ADProxy;
         var _loc2_:PlayerProxy = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
         var _loc3_:ContinuePlayProxy = facade.retrieveProxy(ContinuePlayProxy.NAME) as ContinuePlayProxy;
         var _loc4_:VideoLinkProxy = facade.retrieveProxy(VideoLinkProxy.NAME) as VideoLinkProxy;
         if((_loc2_.curActor.hasStatus(BodyDef.PLAYER_STATUS_PAUSED)) && !_loc1_.hasStatus(ADDef.STATUS_PLAYING) && !_loc1_.hasStatus(ADDef.STATUS_PAUSED) && !_loc3_.hasStatus(ContinuePlayDef.STATUS_OPEN) && !_loc4_.hasStatus(VideoLinkDef.STATUS_OPEN) && !this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_FOCUS_OPEN))
         {
            if(FlashVarConfig.owner == FlashVarConfig.OWNER_PAGE || FlashVarConfig.owner == FlashVarConfig.OWNER_CLIENT && !(FlashVarConfig.os == FlashVarConfig.OS_XP))
            {
               return true;
            }
         }
         return false;
      }
      
      private function checkLogoShowStatus() : Boolean {
         if(SwitchManager.getInstance().getStatus(SwitchDef.ID_SHOW_LOGO))
         {
            if(FlashVarConfig.owner == FlashVarConfig.OWNER_PAGE || FlashVarConfig.owner == FlashVarConfig.OWNER_CLIENT && !(FlashVarConfig.os == FlashVarConfig.OS_XP))
            {
               return true;
            }
         }
         return false;
      }
      
      private function onStageMouseMove(param1:MouseEvent) : void {
         Mouse.show();
         TweenLite.killTweensOf(this.delayedComplete);
         TweenLite.delayedCall(SceneTileDef.MOUSE_HIDE_DELAY_TIME / 1000,this.delayedComplete);
      }
      
      private function delayedComplete() : void {
         var _loc1_:PlayerProxy = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
         if(!_loc1_.curActor.hasStatus(BodyDef.PLAYER_STATUS_STOPED) && !_loc1_.curActor.hasStatus(BodyDef.PLAYER_STATUS_FAILED))
         {
            Mouse.hide();
         }
      }
      
      private function onPlayerRunning(param1:int, param2:int, param3:int, param4:int) : void {
         var _loc5_:PlayerProxy = null;
         if(this.checkFullHdTipShowEnable(param4))
         {
            this._fullHDTipShown = true;
            LSO.getInstance().fullHDTipdate = new Date();
            if(this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW))
            {
               this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
            }
            this._sceneTileProxy.addStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
            PingBack.getInstance().userActionPing(PingBackDef.FULL_HD_TIP_SHOW);
            _loc5_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
            LSO.getInstance().uuid = _loc5_.curActor.uuid;
            if(LSO.getInstance().hdTipShown >= 2)
            {
               LSO.getInstance().hdTipShown = 1;
            }
            else
            {
               LSO.getInstance().hdTipShown++;
            }
         }
      }
      
      private function checkFullHdTipShowEnable(param1:int) : Boolean {
         var _loc2_:PlayerProxy = null;
         var _loc3_:SettingProxy = null;
         var _loc4_:ControllBarProxy = null;
         var _loc5_:Date = null;
         var _loc6_:Date = null;
         if(!this._fullHDTipShown && param1 >= 30000 && !this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW))
         {
            _loc2_ = facade.retrieveProxy(PlayerProxy.NAME) as PlayerProxy;
            _loc3_ = facade.retrieveProxy(SettingProxy.NAME) as SettingProxy;
            _loc4_ = facade.retrieveProxy(ControllBarProxy.NAME) as ControllBarProxy;
            if(!_loc2_.curActor.collectStateInfo.isHasCollect && (_loc4_.hasStatus(ControllBarDef.STATUS_COLLECT_BTN_SHOW)) && !_loc3_.hasStatus(SettingDef.STATUS_DEFINITION_OPEN) && (!_loc4_.hasStatus(ControllBarDef.STATUS_PREVIEW_VIDEO_SHOW) || Math.abs(this._sceneTileView.fullHDTipX + 50 - _loc4_.previewX) >= 130))
            {
               _loc5_ = new Date();
               _loc6_ = LSO.getInstance().fullHDTipdate;
               if(!(LSO.getInstance().uuid == _loc2_.curActor.uuid) || LSO.getInstance().hdTipShown < 2 || !(_loc5_.date == _loc6_.date) || !(_loc5_.month == _loc6_.month) || !(_loc5_.fullYear == _loc6_.fullYear))
               {
                  return true;
               }
            }
         }
         return false;
      }
      
      private function delayedHideFullHDTip() : void {
         TweenLite.killTweensOf(this.delayedHideFullHDTip);
         this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
      }
      
      private function checkOverlapPreview(param1:int) : void {
         if(this._sceneTileProxy.hasStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW))
         {
            if(Math.abs(this._sceneTileView.fullHDTipX + 50 - param1) < 130)
            {
               this._sceneTileProxy.removeStatus(SceneTileDef.STATUS_FULL_HD_TIP_SHOW);
            }
         }
      }
   }
}
